package _24_beiwanglu_pattern.v6_0_better_Packagability;

import java.util.HashMap;

/**
 * @Description: 备忘录角色
 * @Auther: 2019/6/9 0:43 by zhang.jy
 */
public class Memento implements IMemento{
     //接受HashMap作为状态
     private HashMap<String,Object> stateMap;
     //接受一个对象，建立一个备份
     public Memento(HashMap<String,Object> map){
             this.stateMap = map;
     }
     public HashMap<String,Object> getStateMap() {
             return stateMap;
     }
     public void setStateMap(HashMap<String,Object> stateMap) {
             this.stateMap = stateMap;
     }
}